home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / tcsdkbmpbridge.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2004-07-15  |  1.5 KB  |  49 lines

  1. //******************************************************************'
  2. //*                                                                *'
  3. //*                      TurboCAD for Windows                      *'
  4. //*                   Copyright (c) 1993 - 2004                    *'
  5. //*             International Microcomputer Software, Inc.         *'
  6. //*                            (IMSI)                              *'
  7. //*                      All rights reserved.                      *'
  8. //*                                                                *'
  9. //******************************************************************'
  10. // TCSDKBMPBridge.cpp : Defines the entry point for the DLL application.
  11. //
  12.  
  13. #include "stdafx.h"
  14. #include "TCSDKBMPBridge.h"
  15. BOOL APIENTRY DllMain( HANDLE hModule, 
  16.                        DWORD  ul_reason_for_call, 
  17.                        LPVOID lpReserved
  18.                      )
  19. {
  20.     return TRUE;
  21. }
  22.  
  23. STDAPI DllRegisterServer(void)
  24. {
  25.     // registers object, typelib and all interfaces in typelib
  26.     return S_OK;
  27. }
  28.  
  29. long _stdcall GetServerProgIDs(VARIANT* pvarIDs)
  30. {
  31.     long nCnt = 1;
  32.     long nIndicies = 0;
  33.  
  34.     CComBSTR bstrProgID(_T("TCSDKBMP.TCSDKBMPFilter"));
  35.     BSTR bstr = bstrProgID.Detach();
  36.  
  37.     SAFEARRAY* psa = SafeArrayCreateVector(VT_BSTR, 0, nCnt);
  38.     
  39.     HRESULT hr = SafeArrayPutElement(psa, &nIndicies, bstr);
  40.     _ASSERTE(SUCCEEDED(hr));
  41.  
  42.     bstrProgID.Detach();
  43.  
  44.     pvarIDs->vt = VT_ARRAY | VT_BSTR;
  45.     pvarIDs->parray = psa;
  46.  
  47.     return nCnt;
  48. }
  49.